package de.urlaub.client.gui;

import javax.naming.Context;
import javax.naming.NamingException;
import javax.swing.JPanel;

import de.urlaub.client.logic.VacationPanelUtil;
import de.urlaub.server.logic.DataUtilRemote;

public class StartPanel extends JPanel 
{
	private DataUtilRemote dataUtil;
	
	public StartPanel(DataUtilRemote dataUtil)
	{		
		this.dataUtil = dataUtil;
		try
		{
			Context context = VacationPanelUtil.getInitialContext();
			this.dataUtil = (DataUtilRemote) context.lookup("DataUtil/remote");
		}
		catch (NamingException nEx)
		{
			nEx.printStackTrace();
		}
		this.setName("Start");
		this.setVisible(true);
	}
	
	@Override
	public String toString()
	{
		return this.getName();
	}
	
	public void buildPanel()
	{
		this.removeAll();
	}
}
